package com.zhouchao.mvp.login;

import com.zhouchao.mvp.Entity.User;
import com.zhouchao.mvp.model.IModel;
import com.zhouchao.mvp.presenter.IPresenter;
import com.zhouchao.mvp.view.IView;

/**
 * 描述：
 * zhougan
 * 2019/2/28
 **/
public interface LoginContract {
    interface ILoginView extends IView{
        String getName();
        String getPassword();
        void onClear();
        void onLoginSuccess();
        void onLoginFailure(String msg);
        void onProgressBarVisibility(boolean show);

    }

    interface ILoginModel extends IModel {
        void login(User user,Callback callback);
        String invalite(User user);

        interface Callback{
            void onSuccess( );
            void onFailure(String msg);
        }
    }


    interface ILoginPresenter extends IPresenter{
        void login(String name,String password);
        void clear();
        void setProgressBarVisibility(Boolean show);
    }
}
